package Inventory;

import java.sql.Date;

public class InventoryRecord {

	//Attributes
	private String ID,supplyName,unitName;
	private Date time;
	private int in,out;
	
	//Constructors
	public InventoryRecord(String id, String name,Date T,int i,int o){
		//In case no unit was specified
		ID=id;
		supplyName=name;
		unitName="";
		time=T;
		in=i;
		out=o;
	}
	
	public InventoryRecord(String id,String uName,String name,Date T,int i,int o){
		//ideal constructor
		ID=id;
		supplyName=name;
		unitName=uName;
		time=T;
		in=i;
		out=o;
	}
	
	/*
	 * get and set
	 * also includes the getbalance
	 * */
	public String getID(){
		return ID;
	}
	public int getIn(){
		return in;
	}
	public int getOut(){
		return out;
	}
	public Date getTimeRecorded(){
		return time;
	}
	public String getSupplyName(){
		return supplyName;
	}
	public String getUnitName(){
		return unitName;
	}
	public int getBalance(){
		return (in-out);
	}
	
	public void setIn(int i){
		in=i;
	}
	public void setOut(int o){
		out=o;
	}
	public void setSupplyName(String name){
		supplyName=name;
	}
	public void setUnitName(String name){
		unitName=name;
	}
	
}
